/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package proj5labbd.graphics.jornal;

import java.awt.Dimension;
import java.awt.Toolkit;
import proj5labbd.DBInterface;
import proj5labbd.graphics.MainFrame;
import proj5labbd.graphics.abstractOpGraphics.OperationFrame;

/**
 *
 * @author yulevaz
 */
public class JornalFrame extends OperationFrame {

    private final int width = 700;
    private final int height = 600;

    public JornalFrame(MainFrame frame, DBInterface dbInterface) {
        super(frame);
        setTitle("Jornal");
        Dimension dim = Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((dim.width-width)/2,(dim.height-height)/2,width,height);
        setDefaultCloseOperation(JornalFrame.DISPOSE_ON_CLOSE);
        addPanel(new JoInsertPanel(this,dbInterface),OpPanel.INSERT);
        super.jtbbOperation.addTab("Inserção", null, insertPanel, "Inserção de jornais");
        addPanel(new JoViewPanel(this,dbInterface),OpPanel.VIEW);
        super.jtbbOperation.addTab("Visualização", null, viewPanel, "Visualização de jornais");
        addPanel(new JoRmPanel(this,dbInterface), OpPanel.REMOVE);
        super.jtbbOperation.addTab("Remoção", null, rmPanel, "Remoção de jornais");
        addPanel(new JoUpPanel(this,dbInterface), OpPanel.UPDATE);
        super.jtbbOperation.addTab("Atualização", null, updatePanel, "Atualização de jornais");
    }

}
